package nl.haemers.data.reflection 
{
	import nl.haemers.data.collections.List;
	import nl.haemers.data.constants.ReflectionConstants;
	
	/**
	 * ...
	 * @author Jonathan Haemers
	 */
	public class Args extends List implements IArgs 
	{
		
		public function Args() 
		{

		}
		
		
		/** Public methods **/
		public function getArg(name:String) : IArg
		{
			return super.search(name) as IArg;
		}
		
		/** Getters & Setters **/
		
		/** Protected methods **/
		
		/** Private methods **/
		
		/** Static methods **/
		internal static function init(xml:XML) : IArgs
		{
			var args:Args = new Args();
			
			for each(var node:XML in xml.elements(ReflectionConstants.XML_ARG))
			{
				var arg:Arg = Arg.init(node) as Arg;
				args.add(arg.toString(), arg);
			}
			
			return args;
		}
	}

}